/**
 * Copyright 2023-present DreamNum Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { BooleanNumber, LocaleType, SheetTypes } from '@univerjs/core';

import { toExcel } from './cmdb';
let xlsData = toExcel();

/**
 * Default workbook data
 * @type {IWorkbookData} document see https://univer.ai/typedoc/@univerjs/core/interfaces/IWorkbookData
 */
export const DEFAULT_WORKBOOK_DATA = {
  id: 'workbook-01',
  locale: LocaleType.ZH_CN,
  name: 'universheet',
  sheetOrder: ['新增/修改项', '删除项'],
  appVersion: '3.0.0-alpha',
  //不同的内容的显示风格设置好
  styles: {
    //主键
    keyText: {
      cl: {
        rgb: '#B2B2B2',
      },
    },
    //表头文字
    boldText: {
      bl: 1,
    },
    //修改行
    // modifi: {
    //  it: 1
    // },
    //修改行内被修改的列
    modified: {
      it: 1,
      bg: {
        rgb: '#CEF273',
      },
    },
    //删除的行
    deleted: {
      st: {
        s: 1,
      },
    },
  },
  sheets: {
    '新增/修改项': {
      type: SheetTypes.GRID,
      id: '新增/修改项',
      name: '新增/修改项',
      cellData: xlsData.dataModi,
      tabColor: 'green',
      hidden: BooleanNumber.FALSE,
      rowCount: 10,
      columnCount: 3,
      zoomRatio: 1,
      scrollTop: 200,
      scrollLeft: 100,
      defaultColumnWidth: 93,
      defaultRowHeight: 27,
      status: 1,
      showGridlines: 1,
      hideRow: [],
      hideColumn: [],
      rowHeader: {
        width: 46,
        hidden: BooleanNumber.FALSE,
      },
      columnHeader: {
        height: 20,
        hidden: BooleanNumber.FALSE,
      },
      selections: ['A2'],
      freeze: {
        startRow: 1,
        startColumn: 0,
        ySplit: 1,
        xSplit: 0,
      },
    },
    删除项: {
      type: SheetTypes.GRID,
      id: '删除项',
      name: '删除项',
      tabColor: 'red',
      cellData: xlsData.dataDel,
      rowCount: 20,
      columnCount: 3,
      freeze: {
        startRow: 1,
        startColumn: 0,
        ySplit: 1,
        xSplit: 0,
      },
    },
  },
};
